home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-04 | 2.3 KB | 66 lines | [TEXT/GEOL] |
- Item forwarded by LOOMIS to GUITTET1
-
- Item forwarded by LOOMIS to COWSAR1 PLUMMER1 REKIETA1
-
- Item 2646240 29-April-90 22:34PDT
-
- From: WILSON6 Wilson, Dave-Personal Concepts,VCA
-
- To: MACAPP.TECH$ MacApp Technical
-
- cc: S.FRIEDRICH Friedrich, Steve
-
- Sub: DoSetCursor response time
-
- Can anyone suggest the best way to make DoSetCursor work?
-
- As Rob Chandok mentioned recently, your application object will not check the
- cursor position often enough without your help. What Rob recommended was
- setting TApplication.fIdleFreq := 5. The problem is that this steals time from
- background tasks.
-
- Here are my results so far with the small Bird sample from our book:
-
- 1. Write the following method:
-
- {$S ARes}
- FUNCTION TBirdView.DoSetCursor(localPoint: Point;
- cursorRgn: RgnHandle): BOOLEAN; OVERRIDE;
- VAR
- qdExtent: Rect;
- BEGIN
- SetCursor(GetCursor(crossCursor)^^);
- GetQDExtent(qdExtent);
- RectRgn(cursorRgn, qdExtent);
- DoSetCursor := TRUE;
- END;
-
- 2. Test the program under MultiFinder. As the mouse pointer is moved over the
- BirdView, the arrow changes to a cross cursor immediately at times, but
- sometimes the change is delayed for up to one second. I assume the application
- has gone to sleep for 60 ticks.
-
- 3. Test the program with the MultiFinder "Timer" test program running in the
- background. This says that Timer gets about 97% of full performance, which is
- fine. This also has the strange result that the cursor in the Bird sample
- program now switches quickly - no more 60 tick delay. Why?
-
- 4. Recompile Bird, setting TBirdView.fIdleFreq to 6 ticks in TBirdView.IRes().
- Now the cursor always switches quickly, but Timer only gets about 92% time as a
- background task.
-
- I would prefer to have the cursor always change quickly, and not steal time
- (even 5%) from background tasks. Is there a better way? I also assume that it
- is better to set the idle frequency for the view than for the application, if
- it is just for cursor tracking. Comments?
-
- By the way, it seems messy to have to set fIdleFreq at all - it seems
- aesthetically more pleasing to just have to provide the DoSetCursor method, and
- have MacApp do the rest.
-
- Thanks,
-
- Dave
-
-
-